﻿potential_bride_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1
		education_martial_4 = { weight = { base = 1 } }
		education_diplomacy_4 = { weight = { base = 2 } }
		education_intrigue_4 = { weight = { base = 2 } }
		education_learning_4 = { weight = { base = 1 } }
		education_stewardship_4 = { weight = { base = 1 } }
		
		education_martial_3 = { weight = { base = 5 } }
		education_diplomacy_3 = { weight = { base = 10 } }
		education_intrigue_3 = { weight = { base = 10 } }
		education_learning_3 = { weight = { base = 5 } }
		education_stewardship_3 = { weight = { base = 5 } }
		
		education_martial_2 = { weight = { base = 25 } }
		education_diplomacy_2 = { weight = { base = 30 } }
		education_intrigue_2 = { weight = { base = 30 } }
		education_learning_2 = { weight = { base = 25 } }
		education_stewardship_2 = { weight = { base = 25 } }
		
		education_martial_1 = { weight = { base = 30 } }
		education_diplomacy_1 = { weight = { base = 35 } }
		education_intrigue_1 = { weight = { base = 35 } }
		education_learning_1 = { weight = { base = 30 } }
		education_stewardship_1 = { weight = { base = 30 } }
	}
	random_traits_list = {
		count = 1
		brave = {}
		craven = {}
		calm = {}
		wrathful = {}
		chaste = {}
		lustful = {}
		generous = {}
		greedy = {}
		temperate = {}
		gluttonous = {}
		trusting = {}
		paranoid = {}
	}
	random_traits_list = {
		count = 1
		content = {}
		ambitious = {}
		diligent = {}
		lazy = {}
		arbitrary = {}
		just = {}
		gregarious = {}
		shy = {}
		patient = {}
		impatient = {}
		compassionate = {}
		callous = {}
		sadistic = {}
	}
	random_traits_list = {
		count = 1
		fickle = {}
		stubborn = {}
		eccentric = {}
		forgiving = {}
		vengeful = {}
		humble = {}
		arrogant = {}
		honest = {}
		deceitful = {}
		zealous = {}
		cynical = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		min_template_decent_skill
	}
	intrigue = {
		min_template_low_skill
		min_template_decent_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}
	gender_female_chance = {
		if = {
			limit = {
				scope:liege = { allowed_to_marry_same_sex_trigger = yes }
			}
			add = 50
		}
		else_if = {
			limit = { scope:liege = { is_female = yes } }
			add = 0
		}
		else = {
			add = 100
		}
	}
	random_traits = no
	dynasty = generate
	culture = scope:liege.culture
	faith = scope:liege.faith
	after_creation = {
		#Good genetics
		random = {
			chance = 10
			modifier = { #Emperors
				add = 10
				scope:liege = {
					highest_held_title_tier >= tier_empire
				}
			}
			modifier = { #Kings
				add = 10
				scope:liege = {
					highest_held_title_tier >= tier_kingdom
				}
			}
			modifier = {
				add = {
					value = 20
					if = {
						limit = {
							NOT = { exists = scope:candidate_1 }
							any_in_list = {
								list = elegible_candidates_list
								has_trait = beauty_good
								count = 0
							}
						}
						add = 25
					}
				}
				scope:liege = {
					has_variable = beauty_important
				}
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 1
				}
				add = -5
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 2
				}
				add = -10
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 3
				}
				add = -10
			}
			random_list = {
				1 = { # Superior genetics
					modifier = { #Emperors
						add = 3
						scope:liege = {
							highest_held_title_tier >= tier_empire
						}
					}
					modifier = { #Kings
						add = 2
						scope:liege = {
							highest_held_title_tier >= tier_kingdom
						}
					}
					random_list = {
						20 = { # Beauty
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}
							add_trait = beauty_good_3
						}
						9 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}
							add_trait = intellect_good_3
						}
						9 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}											
							add_trait = physique_good_3
						}
						2 = { # Fecund													
							add_trait = fecund
						}
					}											
				}
				4 = { # Good genetics
					modifier = { #Emperors
						add = 3
						scope:liege = {
							highest_held_title_tier >= tier_empire
						}
					}
					modifier = { #Kings
						add = 2
						scope:liege = {
							highest_held_title_tier >= tier_kingdom
						}
					}
					random_list = {
						4 = { # Beauty	
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}
							add_trait = beauty_good_2
						}
						1 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}									
							add_trait = intellect_good_2
						}
						1 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}												
							add_trait = physique_good_2
						}
					}											
				}
				25 = { # Decent genetics
					random_list = {
						4 = { # Beauty	
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}				
							add_trait = beauty_good_1
						}
						1 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}									
							add_trait = intellect_good_1
						}
						1 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}											
							add_trait = physique_good_1
						}
					}											
				}
			}
		}
		bs_after_consort_creation_effect = yes
	}
}

potential_jarya_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1
		education_martial_4 = { weight = { base = 1 } }
		education_diplomacy_4 = { weight = { base = 2 } }
		education_intrigue_4 = { weight = { base = 2 } }
		education_learning_4 = { weight = { base = 1 } }
		education_stewardship_4 = { weight = { base = 1 } }
		
		education_martial_3 = { weight = { base = 5 } }
		education_diplomacy_3 = { weight = { base = 10 } }
		education_intrigue_3 = { weight = { base = 10 } }
		education_learning_3 = { weight = { base = 5 } }
		education_stewardship_3 = { weight = { base = 5 } }
		
		education_martial_2 = { weight = { base = 25 } }
		education_diplomacy_2 = { weight = { base = 30 } }
		education_intrigue_2 = { weight = { base = 30 } }
		education_learning_2 = { weight = { base = 25 } }
		education_stewardship_2 = { weight = { base = 25 } }
		
		education_martial_1 = { weight = { base = 30 } }
		education_diplomacy_1 = { weight = { base = 35 } }
		education_intrigue_1 = { weight = { base = 35 } }
		education_learning_1 = { weight = { base = 30 } }
		education_stewardship_1 = { weight = { base = 30 } }
	}
	random_traits_list = {
		count = 1
		brave = {}
		craven = {}
		calm = {}
		wrathful = {}
		chaste = {}
		lustful = {}
		generous = {}
		greedy = {}
		temperate = {}
		gluttonous = {}
		trusting = {}
		paranoid = {}
	}
	random_traits_list = {
		count = 1
		content = {}
		ambitious = {}
		diligent = {}
		lazy = {}
		arbitrary = {}
		just = {}
		gregarious = {}
		shy = {}
		patient = {}
		impatient = {}
		compassionate = {}
		callous = {}
		sadistic = {}
	}
	random_traits_list = {
		count = 1
		fickle = {}
		stubborn = {}
		eccentric = {}
		forgiving = {}
		vengeful = {}
		humble = {}
		arrogant = {}
		honest = {}
		deceitful = {}
		zealous = {}
		cynical = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		min_template_decent_skill
	}
	intrigue = {
		min_template_low_skill
		min_template_decent_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}
	gender_female_chance = {
		if = {
			limit = {
				scope:liege = { allowed_to_marry_same_sex_trigger = yes }
			}
			add = 50
		}
		else_if = {
			limit = { scope:liege = { is_female = yes } }
			add = 0
		}
		else = {
			add = 100
		}
	}
	random_traits = no
	dynasty = none
	culture = scope:concubine_location.culture
	faith = scope:concubine_location.faith
	after_creation = {
		add_character_flag = {
			flag = abducted_non_believer
			years = 5
		}
		#Good genetics
		random = {
			chance = 10
			modifier = { #Emperors
				add = 10
				scope:liege = {
					highest_held_title_tier >= tier_empire
				}
			}
			modifier = { #Kings
				add = 10
				scope:liege = {
					highest_held_title_tier >= tier_kingdom
				}
			}
			modifier = {
				add = {
					value = 20
					if = {
						limit = {
							NOT = { exists = scope:candidate_1 }
							any_in_list = {
								list = elegible_candidates_list
								has_trait = beauty_good
								count = 0
							}
						}
						add = 25
					}
				}
				scope:liege = {
					has_variable = beauty_important
				}
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 1
				}
				add = -5
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 2
				}
				add = -10
			}
			modifier = {
				any_in_list = {
					list = presented_candidates_list
					num_of_good_genetic_traits >= 1
					count >= 3
				}
				add = -10
			}
			random_list = {
				1 = { # Superior genetics
					modifier = { #Emperors
						add = 3
						scope:liege = {
							highest_held_title_tier >= tier_empire
						}
					}
					modifier = { #Kings
						add = 2
						scope:liege = {
							highest_held_title_tier >= tier_kingdom
						}
					}
					random_list = {
						20 = { # Beauty
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}
							add_trait = beauty_good_3
						}
						9 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}
							add_trait = intellect_good_3
						}
						9 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}											
							add_trait = physique_good_3
						}
						2 = { # Fecund													
							add_trait = fecund
						}
					}											
				}
				4 = { # Good genetics
					modifier = { #Emperors
						add = 3
						scope:liege = {
							highest_held_title_tier >= tier_empire
						}
					}
					modifier = { #Kings
						add = 2
						scope:liege = {
							highest_held_title_tier >= tier_kingdom
						}
					}
					random_list = {
						4 = { # Beauty	
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}
							add_trait = beauty_good_2
						}
						1 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}									
							add_trait = intellect_good_2
						}
						1 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}												
							add_trait = physique_good_2
						}
					}											
				}
				25 = { # Decent genetics
					random_list = {
						4 = { # Beauty	
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}				
							add_trait = beauty_good_1
						}
						1 = { # Intellect
							modifier = {
								add = 4
								scope:liege = {
									has_variable = personality_skills_important
								}
							}									
							add_trait = intellect_good_1
						}
						1 = { # Physique
							modifier = {
								add = 4
								scope:liege = {
									has_variable = beauty_important
								}
							}											
							add_trait = physique_good_1
						}
					}											
				}
			}
		}
	}
}

yanwan_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1
		education_intrigue_4 = { weight = { base = 5 } }
		education_intrigue_3 = { weight = { base = 10 } }
		education_intrigue_2 = { weight = { base = 15 } }
		education_intrigue_1 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 0 1 }
		beauty_good_1 = {}
	}
	random_traits_list = {
		count = 2
		ambitious = {}
		deceitful = {}
	}
	random_traits_list = {
		count = 1
		callous = {}
		sadistic = {}
		vengeful = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		max_template_decent_skill
		min_template_high_skill
	}
	intrigue = {
		max_template_average_skill
		min_template_average_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}

	gender_female_chance = {
		if = {
			limit = {
				scope:harem_liege = { allowed_to_marry_same_sex_trigger = yes }
			}
			add = 50
		}
		else_if = {
			limit = { scope:harem_liege = { is_female = yes } }
			add = 0
		}
		else = {
			add = 100
		}
	}

	random_traits = no
	dynasty = generate
	culture = scope:concubine_location.culture
	faith = scope:concubine_location.faith
	after_creation = {
		hp_after_consort_creation_effect = yes
	}
}

pretty_servant_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1
		education_martial_4 = { weight = { base = 5 } }
		education_diplomacy_4 = { weight = { base = 5 } }
		education_intrigue_4 = { weight = { base = 10 } }
		education_learning_4 = { weight = { base = 5 } }
		education_stewardship_4 = { weight = { base = 5 } }
		
		education_martial_3 = { weight = { base = 15 } }
		education_diplomacy_3 = { weight = { base = 15 } }
		education_intrigue_3 = { weight = { base = 20 } }
		education_learning_3 = { weight = { base = 15 } }
		education_stewardship_3 = { weight = { base = 15 } }
		
		education_martial_2 = { weight = { base = 20 } }
		education_diplomacy_2 = { weight = { base = 20 } }
		education_intrigue_2 = { weight = { base = 25 } }
		education_learning_2 = { weight = { base = 20 } }
		education_stewardship_2 = { weight = { base = 20 } }
		
		education_martial_1 = { weight = { base = 25 } }
		education_diplomacy_1 = { weight = { base = 25 } }
		education_intrigue_1 = { weight = { base = 30 } }
		education_learning_1 = { weight = { base = 25 } }
		education_stewardship_1 = { weight = { base = 25 } }
	}
	random_traits_list = {
		count = { 1 0 }
		fecund = {}
		shrewd = {}
		strong = {}
	}
	random_traits_list = {
		count = 1
		beauty_good_3 = { weight = { base = 5 } }
		beauty_good_2 = { weight = { base = 15 } }
	}
	random_traits_list = {
		count = 2
		shy = {}
		trusting = {}
	}
	random_traits_list = {
		count = 1
		vengeful = {}
		callous = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		min_template_decent_skill
	}
	intrigue = {
		max_template_decent_skill
		min_template_decent_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}
	random_traits = no
	dynasty = generate
	culture = scope:concubine_location.culture
	faith = scope:concubine_location.faith
	after_creation = {
		hp_after_consort_creation_effect = yes
	}
}

mei_pin_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1		
		education_diplomacy_3 = { weight = { base = 15 } }
		
		education_diplomacy_2 = { weight = { base = 20 } }
		
		education_diplomacy_1 = { weight = { base = 25 } }
	}
	random_traits_list = {
		count = { 1 0 }
		beauty_good_1 = {}
	}
	random_traits_list = {
		count = 3
		brave = {}
		arrogant = {}
		vengeful = {}
		deceitful = {}
		wrathful = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		max_template_decent_skill
		min_template_high_skill
	}
	intrigue = {
		max_template_decent_skill
		min_template_high_skill
	}
	learning = {
		min_template_decent_skill
		max_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}

	gender_female_chance = {
		if = {
			limit = {
				scope:harem_liege = { allowed_to_marry_same_sex_trigger = yes }
			}
			add = 50
		}
		else_if = {
			limit = { scope:harem_liege = { is_female = yes } }
			add = 0
		}
		else = {
			add = 100
		}
	}

	random_traits = no
	dynasty = generate
	culture = scope:concubine_location.culture
	faith = scope:concubine_location.faith
	after_creation = {
		hp_after_consort_creation_effect = yes
	}
}

consort_relative_template = {
	#General
	random_traits_list = {
		count = 1
		education_martial_4 = { weight = { base = 5 } }
		education_diplomacy_4 = { weight = { base = 5 } }
		education_intrigue_4 = { weight = { base = 5 } }
		education_learning_4 = { weight = { base = 5 } }
		education_stewardship_4 = { weight = { base = 5 } }
		
		education_martial_3 = { weight = { base = 10 } }
		education_diplomacy_3 = { weight = { base = 10 } }
		education_intrigue_3 = { weight = { base = 10 } }
		education_learning_3 = { weight = { base = 10 } }
		education_stewardship_3 = { weight = { base = 10 } }
		
		education_martial_2 = { weight = { base = 15 } }
		education_diplomacy_2 = { weight = { base = 15 } }
		education_intrigue_2 = { weight = { base = 15 } }
		education_learning_2 = { weight = { base = 15 } }
		education_stewardship_2 = { weight = { base = 15 } }
		
		education_martial_1 = { weight = { base = 15 } }
		education_diplomacy_1 = { weight = { base = 15 } }
		education_intrigue_1 = { weight = { base = 15 } }
		education_learning_1 = { weight = { base = 15 } }
		education_stewardship_1 = { weight = { base = 15 } }
	}
	random_traits_list = {
		count = 1
		brave = {}
		craven = {}
		calm = {}
		wrathful = {}
		chaste = {}
		lustful = {}
		generous = {}
		greedy = {}
		temperate = {}
		gluttonous = {}
		trusting = {}
		paranoid = {}
	}
	random_traits_list = {
		count = 1
		content = {}
		ambitious = {}
		diligent = {}
		lazy = {}
		arbitrary = {}
		just = {}
		gregarious = {}
		shy = {}
		patient = {}
		impatient = {}
		compassionate = {}
		callous = {}
		sadistic = {}
	}
	random_traits_list = {
		count = 1
		fickle = {}
		stubborn = {}
		eccentric = {}
		forgiving = {}
		vengeful = {}
		humble = {}
		arrogant = {}
		honest = {}
		deceitful = {}
		zealous = {}
		cynical = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		min_template_decent_skill
	}
	intrigue = {
		min_template_low_skill
		min_template_decent_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}
	random_traits = no
	dynasty = none
	culture = scope:meddling_relative.culture
	faith = scope:meddling_relative.faith
	age = scope:meddling_relative.age
	#Misc
	after_creation = {
		copy_inheritable_appearance_from = scope:meddling_relative
	}
}

hailan_template = {
	age = { 16 20 }
	random_traits_list = {
		count = 1
		education_intrigue_4 = { weight = { base = 5 } }
		education_intrigue_3 = { weight = { base = 10 } }
		education_intrigue_2 = { weight = { base = 15 } }
		education_intrigue_1 = { weight = { base = 10 } }
	}
	random_traits_list = {
		count = { 0 1 }
		beauty_good_1 = {}
		intellect_good_1 = {}
	}
	random_traits_list = {
		count = 3
		craven = {}
		content = {}
		deceitful = {}
		vengeful = {}
	}
	martial = {
		min_template_low_skill
		min_template_decent_skill
	}
	stewardship = {
		min_template_low_skill
		min_template_decent_skill
	}
	diplomacy = {
		min_template_low_skill
		min_template_decent_skill
	}
	intrigue = {
		max_template_decent_skill
		min_template_high_skill
	}
	learning = {
		min_template_low_skill
		min_template_decent_skill
	}
	prowess = {
		min_template_low_skill
		min_template_decent_skill
	}

	gender_female_chance = {
		if = {
			limit = {
				scope:harem_liege = { allowed_to_marry_same_sex_trigger = yes }
			}
			add = 50
		}
		else_if = {
			limit = { scope:harem_liege = { is_female = yes } }
			add = 0
		}
		else = {
			add = 100
		}
	}

	random_traits = no
	dynasty = generate
	culture = scope:concubine_location.culture
	faith = scope:concubine_location.faith
	after_creation = {
		hp_after_consort_creation_effect = yes
	}
}